home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / OLE2BOOK.ZIP / CHAP02.ZIP / CHAP02 / SKEL / SKEL.CPP < prev    next >
C/C++ Source or Header  |  1993-03-16  |  1KB  |  57 lines

  1. /*
  2.  * SKEL.CPP
  3.  *
  4.  * Skeleton application using CLASSLIB which only needs a WinMain
  5.  * and a number of standard resources.
  6.  *
  7.  * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  8.  *
  9.  * Kraig Brockschmidt, Software Design Engineer
  10.  * Microsoft Systems Developer Relations
  11.  *
  12.  * Internet  :  kraigb@microsoft.com
  13.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  14.  */
  15.  
  16.  
  17.  
  18.  
  19. #include <windows.h>
  20. #include <classlib.h>
  21.  
  22.  
  23. /*
  24.  * WinMain
  25.  *
  26.  * Purpose:
  27.  *  Main entry point of application.   Should register the app class
  28.  *  if a previous instance has not done so and do any other one-time
  29.  *  initializations.
  30.  */
  31.  
  32. int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLine, int nCmdShow)
  33.     {
  34.     LPCFrame        pFR;
  35.     FRAMEINIT       fi;
  36.     WPARAM          wRet;
  37.  
  38.     //Attempt to allocate and initialize the application
  39.     pFR=new CFrame(hInst, hPrev, pszCmdLine, nCmdShow);
  40.  
  41.     fi.idsMin=IDS_STANDARDFRAMEMIN;
  42.     fi.idsMax=IDS_STANDARDFRAMEMAX;
  43.     fi.idsStatMin=IDS_STANDARDSTATMESSAGEMIN;
  44.     fi.idsStatMax=IDS_STANDARDSTATMESSAGEMAX;
  45.     fi.idStatMenuMin=ID_MENUFILE;
  46.     fi.idStatMenuMax=ID_MENUHELP;
  47.     fi.iPosWindowMenu=WINDOW_MENU;
  48.     fi.cMenus=CMENUS;
  49.  
  50.     //If we can initialize pFR, start chugging messages
  51.     if (pFR->FInit(&fi))
  52.         wRet=pFR->MessageLoop();
  53.  
  54.     delete pFR;
  55.     return wRet;
  56.     }
  57.